// 文章模型
const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    title: String,
    create_time: String,
    update_time: {
        type: String,
        default: ''
    },
    content: String,
    source: String,
    author: String,
    read: {
        type: Number,
        default: 0
    },
    star: {
        type: Number,
        default: 0
    },
    comment: {
        type: Number,
        default: 0
    }
})

let M_article = mongoose.model('articles', schema)

module.exports = M_article
